package edu.cicese.tm;

import com.jsurf.InterestPoint;

import java.io.Serializable;
import java.util.Collection;

public class Match implements Comparable<Match>, Serializable{
	private static final long serialVersionUID = 1;
	
	public int quantity;
	public String filename, space;
//	public List<InterestPoint> points;
	public Collection<InterestPoint> points;
	public InterestPoint ip;
	public int ocurrences;
	
	public Match(int quantity, String filename) {
		this.quantity = quantity;
		this.filename = filename;
	}
	
	public Match(int quantity, String filename, String space) {
		this.quantity = quantity;
		this.filename = filename;
		this.space = space;
	}
	
	public Match(int quantity, int ocurrences, String space) {
		this.quantity = quantity;
		this.ocurrences = ocurrences;
		this.space = space;
	}

	public Match(Collection<InterestPoint> matches, String filename) {
		this.points = matches;
		this.filename = filename;
		quantity = matches.size();
	}

	public Match(String filename, InterestPoint ip) {
		this.filename = filename;
		this.ip = ip;
	}

	public int compareTo(Match m) {
		return m.quantity - this.quantity;
	}
}